export default {
    namespaced: true,
    state: {
        signStatus:false,              

        signIn: [{
            title: '',
            time: '',
            coin: ''
        }],
    },
    mutations: {
        getSignIn(state, payload) {
            // 获取浏览器本地存储的签到数组
            let signArr = JSON.parse(localStorage.getItem('signArr')) ? JSON.parse(localStorage.getItem('signArr')) : []
            // 点击打卡后将信息push到数组中
            signArr.push(payload)
            state.signIn = signArr
            // 更新浏览器本地存储信息
            localStorage.setItem('signArr',JSON.stringify(state.signIn))
        },
        isSignIn(state,payload){
            console.log(payload);
            state.signStatus = payload
        }
    },
    actions:{
        updateSignStatus(){

        }
    }
    
}